import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:youfangtong_module/channel_maintainer/root_tabbar/channel_maintainer_tabbar.dart';
import 'package:youfangtong_module/widgets/my_colors.dart';

void main() {
  runApp(MyApp(homeRouteName: window.defaultRouteName));
}

class MyApp extends StatelessWidget {

  String homeRouteName;

  MyApp({super.key,required this.homeRouteName});


  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "友房通",
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: MyColors.color_1C234D),
        useMaterial3: true,
      ),
      home: homePage(),
    );
  }

  Widget homePage() {
    // 单独运行
    if (homeRouteName == "/") {
      return Container();
    } else {
      // 从App里面打开
      return const ChannelMaintainerTabBar();
    }
  }

}